import Vue from "vue";
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/login',
            hidden: true,
            component: () => import('@/components/LoginPage.vue')
        },
        {
            path: '/login',
            hidden: true,
            component: () => import('@/components/LoginPage.vue')
        },
        {
            path: '*',
            redirect: 'NotFound',
            hidden: true,
            component: () => import('@/components/NotFound.vue')
        },
        {
            path: '/NotFound',
            hidden: true,
            component: () => import('@/components/NotFound.vue')
        },
        {
            path: '/home',
            name: '用户管理',
            iconClass: 'fa fa-users',

            component: () => import('@/components/HomePage.vue'),
            children: [
                {
                    path: '/home/users',
                    name: '用户列表',
                    iconClass: 'fa fa-list',
                    component: () => import('@/components/users/UserList.vue')
                }
            ]
        }
    ],
    mode: 'history'
})
